﻿
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using SSDPNET.DataCore;
using ATEC.ATDataCoreNET;
using ATEC.ATDataCoreNET.ATCCL;
using ATEC.CCLObj.CCFWork;

namespace ParameterizedObjectExample
{
    public partial class ParameterizedObjectForm : Form
    {
        public ParameterizedObjectForm()
        {
            InitializeComponent();
        }

        private void btn_CreateParameterizedObject_Click(object sender, EventArgs e)
        {
          
            string rootDir= ConfigurationManager.GetVariable("_ROOTDIR");
            string filePath = rootDir + "CCFWorks\\Ebim\\CustomObjectExample.01.00.db";
            ATSceneRef scene = SSDPNET.ScenesFunctions.SceneRefGetActive();
            ATProject propject = scene.GetATProject();
            //导入CCFwork
            ATCCLManager manger = ATCCLManager.Manager;
            ICCFWork ccfwork;
            if (StatusInt.Success != manger.ImportDBCCFWork(out ccfwork, filePath, propject, false, true))
            {
               // MessageBox.Show("导入失败");
            }
             
            CircularTable circularTable = new CircularTable();
            circularTable.Draw();
        }
    }
}
